package com.xhs.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * 时间范围查询请求DTO
 *
 * @author xhs
 */
@Data
@Schema(description = "时间范围查询请求")
public class ResultTimeRangeRequest {

    /**
     * 手机号
     */
    @Schema(description = "手机号", example = "13800138000", required = true)
    @NotBlank(message = "手机号不能为空")
    private String phoneNumber;



    /**
     * 开始时间
     */
    @Schema(description = "开始时间", example = "2024-01-01 00:00:00", required = true)
    @NotNull(message = "开始时间不能为空")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;

    /**
     * 结束时间
     */
    @Schema(description = "结束时间", example = "2024-01-31 23:59:59", required = true)
    @NotNull(message = "结束时间不能为空")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;
} 